<include file="nav:header"/>
<div class="container-fluid">
    <div class="row">
        <include file="Left:left-Common"/>
        <!-- right -->
        <div class="col-md-10 right">
            <div class="page-header" style="margin-right: 15px">
                <h3>{$page_title}</h3>
            </div>
            <form class="article" action="{:U('Article/addhand')}" method="post">
                <div class="col-md-1 pull-right"></div>
                <button type="button" class="layui-btn pull-right" id="source" style="margin-left: 20px;margin-top: -2px">
                    <i class="layui-icon"></i>سېستىمىغا مەنبە قوشۇش
                </button>
                <button type="button" class="layui-btn pull-right" id="source_edit" style="margin-left: 20px;margin-top: -2px">
                    <i class="layui-icon"></i> مەنبە تەھرىرلەش
                </button>
                <div class="col-md-7">
                <div class="btn-group " role="group" aria-label="Large button group">
                    <a href="{:U('Article/index')}" type="button" class="btn btn-default">بارلىق ئۇچۇرلار</a>
                    <a href="{:U('Article/index')}" type="button" class="btn btn-default"> قايتىش</a>
                </div>
                <br><br>
                <!--表单-->
                    <div class="form-group" >
                        <select   class="form-control" name="pid">
                            <option value="">چوڭ سەھىپە</option>
                            <foreach name="classify" item="c">
                                <option  value="{$c['id']}"><if condition="$c['pid'] neq 0">{$c.lavel|_repeat} ┘─</if>{$c['name']}</option>
                            </foreach>
                        </select>
                    </div>
                    <br>
                    <div class="form-group">
                        <input  name="title" type="text" class="form-control"  id="exampleInputEmail1" placeholder="ئۇچۇر تېمىسىنى يېزىڭ">
                    </div>
                    <br>
                    <div class="form-group">
                        <input name="sort" type="number" class="form-control" id="exampleInputPassword1" placeholder="تەرتىبىنى يېزىڭ">
                    </div>
                    <br>
                    <div class="form-group">
                        <textarea name="summer" class="form-control" rows="3" placeholder="ئۈزۈندە :"></textarea>
                    </div>
                    <div class="form-group">
                        <include file="Editor"/>
                        <textarea  onkeydown="return proc_kd(event);" onkeypress="return addchar(this, event);" type="text/plain" style="min-height: 350px" id="content"  name="content"></textarea>
                        <textarea onkeydown="return proc_kd(event);" onkeypress="return addchar(this, event);" type="text/plain" style="min-height: 350px;display: none;"  id="content1" name="content1" ></textarea>
                        <script type="text/javascript">
                            $(function () {
                                $("[name='ok']").click(function () {
                                    $("#content").hide();
                                    $("#content1").show();
                                });
                            });
                        </script>
                    </div>
                    <div class="form-group">
                        <input style="width:60%"  name="author" type="text" class="form-control pull-left"   placeholder="ئاپتور">
                        <span  style="color: blue" class="pull-right btn_span">يۇشۇرۇن كۆزنەك</span>
                    </div>
                    <br><br>
                     <div class="form-group yoxurun" style="display: none">
                        <input  name="standby1" type="text" class="form-control"   placeholder="كېڭەيتىلمە رايۇن">
                    </div>
                    <div class="form-group yoxurun" style="display: none">
                        <input  name="standby2" type="text" class="form-control"   placeholder="كېڭەيتىلمە رايۇن">
                    </div>
                    <script type="text/javascript">
                        $(".btn_span").click(function () {
                            $(".yoxurun").fadeIn(100);
                        })
                    </script>
                    <br><br>
                    <div class="btn-group checkbox">
                        <label class="btn btn-success btn-xs active" for="in1">
                            <input id="in1"  type="radio" name="status"  value="1" checked> ئوچۇق
                        </label>
                        <label class="btn btn-danger btn-xs" for="in2">
                            <input id="in2"  type="radio" name="status"  value="0"> تاقاق
                        </label>
                    </div>
                    <br><br>
                    <button style="width: 150px" type="submit" class="btn btn-primary">قوشۇش</button>
            </div>
                <div class="hidden-xs hidden-sm" style="height: 52px;"></div>
                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading" style="font-size: 15px">ئەسەر مۇقاۋا رەسىمى</div>
                        <div class="panel-body">
                            <button type="button" class="layui-btn pull-left" id="test1" style="margin-left: 5px">
                                <i class="layui-icon"></i>رەسىم يوللاش
                            </button>
                            <button type="button" class="layui-btn layui-btn-normal pull-left" id="test2">
                                <i class="layui-icon"></i>رەسىم ئامبىرى
                            </button>
                            <input id="thumb" style="width: 40%"  name="thumb" class="form-control pull-right" />
                            <br>
                            <img style="display: none" id="thumbface" src="" />
                        </div>
                        <script type="text/javascript">
                            $("#source").click(function () {
                                layer.open({
                                    type: 2,
                                    skin: 'layui-layer-lan',
                                    title: ['مەنبە قوشۇش', 'background:#1E9FFF;text-align: center'],
                                    fix: false,
                                    shadeClose: true,
                                    maxmin: true,
                                    area: ['25%', '45%'],
                                    content: "{:U('Admin/Article/source')}"
                                    //end: function () {           //关闭弹出层触发
                                    //    location.reload();       //刷新父界面，可改为其他
                                    //}
                                });
                            });
                            $("#test2").click(function () {
                                layer.open({
                                    type: 2,
                                    skin: 'layui-layer-lan',
                                    title: ['رەسىم ئامبىرى', 'background:#1E9FFF;text-align: center'],
                                    fix: false,
                                    shadeClose: true,
                                    maxmin: true,
                                    area: ['70%', '90%'],
                                    content: "{:U('Admin/Article/photo')}"
                                    //end: function () {           //关闭弹出层触发
                                    //    location.reload();       //刷新父界面，可改为其他
                                    //}
                                });
                            });
                            layui.use('upload', function(){
                                var upload = layui.upload;
                                //执行实例
                                var uploadInst = upload.render({
                                    elem: '#test1' //绑定元素
                                    ,url: '{:U("Article/upload")}' //上传接口
                                    ,done: function(res){
                                        //上传完毕回调
                                        if(res.status == 1){
                                            layer.alert(res.message, {
                                                title:"سېستىما ئەسكەرتىشى",
                                                btn:"بىلدىم",
                                                icon: 6,
                                                skin: 'layer-ext-moon',
                                                time:500
                                            });
                                            $("#thumb").val(res.src) ;
                                            $("#thumbface").css("display","block") ;
                                            $("#thumbface").attr("src","/"+res.src) ;
                                        }else{
                                            layer.alert(res.message, {
                                                title:"سېستىما ئەسكەرتىشى",
                                                btn:"بىلدىم",
                                                icon: 5,
                                                skin: 'layer-ext-moon',
                                                time:1000
                                            });
                                        }
                                    }
                                    ,error: function(){
                                        //请求异常回调
                                    }
                                });
                            });
                        </script>
                    </div>
                    <div class="panel panel-default">
                    <div class="panel-heading" style="font-size: 15px">ئەسەرنىڭ باشقا تەڭشىكى</div>
                    <div class="panel-body layui-form">
                        <input style="width: 66%"   type="text" name="from_url" placeholder="مەنبە ئادرېسى:"   class="form-control pull-left">
                        <div class="pull-right col-md-4" style="margin-top: -2px">
                            <select name="from_source" lay-verify="required">
                                <option value="">مەنبە تاللاڭ</option>
                                <foreach name="list['source']" item="s">
                                    <option value="{$s.id}">{$s.name}</option>
                                </foreach>
                            </select>
                            <script>
                                //Demo
                                layui.use('form', function(){
                                    var form = layui.form;
                                    //监听提交
                                    form.on('submit(formDemo)', function(data){
                                        layer.msg(JSON.stringify(data.field));
                                        return false;
                                    });

                                });
                            </script>
                        </div>
                    </div>
                </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" style="font-size: 15px"> خەتكۈچ تاللاش </div>
                        <div class="panel-body">
                            <foreach name="tags" item="t">
                                <label for="for_{$t.id}" class="checkbox-inline">
                                    <input id="for_{$t.id}" type="checkbox" name="tag[]"  value="{$t['id']}">  {$t['tname']}
                                </label>
                            </foreach>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading" style="font-size: 15px">  ئەسەر بېتى تەڭشەكلىرى </div>
                        <div class="panel-body" style="padding: 5px 0">
                            <div class="btn-group checkbox pull-left">
                                <label >
                                    تەگلىك رەڭگى <input style="direction: ltr;text-align: right"   type="text" name="bgcolor"   class="form-control">
                                </label>
                                <br><br>
                                <label  >
                                    خەت رەڭگى <input style="direction: ltr;text-align: right"    type="text" name="color"   class="form-control">
                                </label>
                            </div>
                            <div style="margin-top: 10px" class="btn-group checkbox pull-right">
                                <label >
                                     ۋاقىت بەلگىلەش<input style="direction: ltr;text-align: center"  type="text" name="intime" id="DefineTime" class="form-control">
                                </label>
                                <br><br>
                            </div>
                            <label for="Define" >  ئېدىتوردىكى رەسىمنى قوشامسىز ؟
                                <input type="checkbox" name="ok" id="Define" class="form-control">
                            </label>
                        </div>
                    </div>
                    <button style="width: 150px" type="submit" class="btn btn-primary">قوشۇش</button>
                    <!--<div class="panel panel-default">-->
                        <!--<div class="panel-heading" style="font-size: 15px">  ئەسەر تەۋسىيەلەش </div>-->
                        <!--<div class="panel-body" style="padding: 5px 0">-->
                            <!--<div style="margin-top: 10px;padding: 0 15px" class="btn-group checkbox ">-->
                                <!--<label class="checkbox-inline">-->
                                    <!--<input type="checkbox"  value="option1"> باش بەت-->
                                <!--</label>-->
                                <!--<label class="checkbox-inline">-->
                                    <!--<input type="checkbox"  value="option2"> خەۋەر-->
                                <!--</label>-->
                                <!--<label class="checkbox-inline">-->
                                    <!--<input type="checkbox"  value="option3"> مۇھىم-->
                                <!--</label>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                </div>
            </form>
        </div>
    </div>
</div>
<div class="visible-md visible-lg" style="height:200px;"></div>
<script type="text/javascript">
    //时间选择器
    jeDate({
        dateCell:"#DefineTime",
        format:"YYYY-MM-DD hh:mm:ss",
        isinitVal:true,
        isTime:true, //isClear:false,
        minDate:"2014-09-19 00:00:00",
        okfun:function(val){alert(val)}
    })
</script>L
<include file="nav:footer"/>